from selenium.webdriver.common.by import By
from base import Base
class Page(Base):
    #点击搜索栏
    def find_sousuolan(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="搜索菜谱"]')
        ele=self.dingwei(loc)
        return  ele
    def find_shuru(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.dingwei(loc)
        return ele
    def find_sousuo(self):
        loc=(By.ANDROIDUIAUTOMATOR,'new UiSelector().text("搜索")')
        ele=self.dingwei(loc)
        return  ele
    def find_shangpin(self):
        loc=(By.XPATH,'(//android.widget.ImageView[@resource-id="com.xiachufang:id/common_photo_image_view"])[1]')
        ele=self.dingwei(loc)
        return ele
    def find_shoucanganniu(self):
        loc=(By.ID,'com.xiachufang:id/recipe_bto_nav_bar_collect')
        ele=self.dingwei(loc)
        return ele
